package tgc.edu.tms.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.edu.tms.custom.CommonService;
import tgc.edu.tms.entity.Curriculum;
import tgc.edu.tms.entity.Profession;
import tgc.edu.tms.repository.CurriculumRepository;
@Service
public class CurriculumService extends CommonService<Curriculum, Integer>{
	@Autowired
	private CurriculumRepository curriculumDAO;

	public List<Curriculum> findByProfessionId(Integer id) {
		return curriculumDAO.findByProfessionId(id);
	}

	public Curriculum findByKcmc(String curriculum) {
		return curriculumDAO.findByKcmc(curriculum);
	}

	public Curriculum findByKcmcAndKcdmAndProfession_id(String kcmc, String kcdm, Integer id) {
		return curriculumDAO.findByKcmcAndKcdmAndProfession_id(kcmc,kcdm,id);
	}

	public List<Curriculum> findByKkxqAndProfessionId(String string, Integer id) {
		return curriculumDAO.findByKkxqAndProfessionId(string,id);
		
	}
	
	public Curriculum findByKcmcAndKkxqAndProfession(String kcmc,String kkxq,Profession profession){
		return curriculumDAO.findByKcmcAndKkxqAndProfession(kcmc, kkxq, profession);
	}
}
